#include <iostream>
#include <cmath>
using namespace std;


int main()
{
    double a; char b;
    int sum = 20;

    cin >> a >> b;

    if (a - 1 >= 0)
    {
        sum += ceil(a - 1);
    }
    if (b == 'y') sum += 5;
    cout << sum << endl;
    return 0;
}